package com.atguigu.day05.test;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/4 16:18
 * @注释
 */
public class ArrayTest07 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6,7,8,9};
        int[] arr2 = new int[arr.length << 1];

        for (int i = 0; i < arr.length; i++) {
            arr2[i] = arr[i];
        }
        arr = arr2;
        arr[9] = 10;
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
        }


    }
}
